<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<?php include(DDROOTPATH.'/cache/title/'.$pagetag.'_title.php');?>
<link href="template/<?=MOBAN?>/css/style.css" rel="stylesheet" type="text/css" />
<link href="template/<?=MOBAN?>/css/layout.css" rel="stylesheet" type="text/css" />
<link href="template/<?=MOBAN?>/css/comm.css" rel="stylesheet" type="text/css" />
<link href="template/<?=MOBAN?>/css/baobei.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="template/<?=MOBAN?>/js/jquery.js"></script>
<SCRIPT type="text/javascript" src="template/<?=MOBAN?>/js/base64.js"></SCRIPT>
<SCRIPT type="text/javascript" src="template/<?=MOBAN?>/js/function.js"></SCRIPT>
</head>
<body>
<?php
$modtag="bblist";
include("head_shop.tpl.php");
?>
<div id="Content" class="clearfix MarginT10" style="height:170px">
  <dl class="sharelist">
    <dt class="clearfix">
      <ul>
        <li><a <?php if($catid==''){?> class="active"<?php }?> href="userbao<?=$url_head_id?><?=$userid?>">全部分享</a></li>
        <?php foreach($shaicat_arr as $k=>$v){?>
        <li><a <?php if($k==$catid){?> class="active"<?php }?> href="userbao<?=$url_head_id?><?=$userid?><?=WJT?'-':'&catid='?><?=$k?><?=$url_head_xs?><?=$xs?><?=$url_head_page?>1<?=$url_end?>"><?=$v?></a></li>
        <?php }?>
      </ul>
    </dt>
    <dd>
      <ul>
      <!--<li><a href="#" class="active">最新宝贝</a></li>
      <li><a href="#" class="MarginR0">最热宝贝</a></li>-->
      </ul>
    </dd>
 </dl>
  <div class="clears"></div>
  <dl class="sharebox clearfix">
    <dt>
      <ul class="shareshop clearfix">
        <li><img src="upload/avatar/<?=get_avatar_filepath($userid, $size = 'middle')?>" width="119" height="119" /></li>
        <li class="MarginL10 MarginT10"><div><h3 class="username FLeft"><?=$info['ddusername']?></h3><span class="FLeft">晒单：<strong class="Colorfh Font16"><?=$shai_nums?></strong></span><span class="MarginL10 FLeft">分享：<strong class="Colorfh Font16"><?=$share_nums?></strong></span></div>
        <Div class="clears"></Div>
        <div class="FLeft">
        <a <?php if($xs=='all'){echo "class=\"hisbaby\"";}else{echo "class=\"hisbaby like\"";} ?> href="userbao<?=$url_head_id?><?=$userid?><?=WJT?'-':'&catid='?><?=$catid?><?=$url_head_xs?>all<?=$url_head_page?>1<?=$url_end?>">TA的宝贝</a>
        <a <?php if($xs=='like'){echo "class=\"hisbaby\"";}else{echo "class=\"hisbaby like\"";}?> href="userbao<?=$url_head_id?><?=$userid?><?=WJT?'-':'&catid='?><?=$catid?><?=$url_head_xs?>like<?=$url_head_page?>1<?=$url_end?>">TA的喜欢</a></div>
        </li>
      </ul>
    <div class="clears"></div>
    </dt>
    <dd class="receive">
      <ul>
        <li><?=$info['hart']?></li>
        <li class="recB"> 收到的</li>
      </ul>
    </dd>
  </dl>
</div>
<div class="bblist">
  <?php
  $shaidan_num=count($shaidan_arr);
  ?>
  <?php for($j=0;$j<$shaidan_num;$j++){?>
 <div class=item1>
   <div class="picbox"><a href="baobei<?=$url_head_id?><?=$shaidan_arr[$j]['id']?><?=$url_end?>" target="_blank"><?=html_img($shaidan_arr[$j]['image'],$shaidan_arr[$j]['title'],'goods_list_img_i',200,'')?></a></div>
   <div class="line">
     <div class="box" style="background:url(template/<?=MOBAN?>/images/like.gif) left;cursor:pointer;width:63px" onclick="likek(<?=$shaidan_arr[$j]['id']?>)" title="送红心" ></div>
	 <div class="box" style="background:#000;width:30px;line-height:29px;text-align:center;color:#FFF" id="x_<?=$shaidan_arr[$j]['id']?>"><?=$shaidan_arr[$j]['hart']?></div>
     <div class="box" style="float:right;height:14px;margin-top:10px">
     	<a href="baobei<?=$url_head_id?><?=$shaidan_arr[$j]['id']?><?=$url_end?>#p" target="_blank"><img src="template/<?=MOBAN?>/images/pl.gif" width="22" height="13" border="0" /> 评论</a>
     </div>
   </div>
   <div class="line" style="height:38px">
   	<div class="headbox"><img src="upload/avatar/<?=get_avatar_filepath($shaidan_arr[$j]['dduserid'], $size = 'small', $type = '')?>" width="34" height="34" border="0" /></div>
	<div class="t"><a href="userbao<?=$url_head_id?><?=$shaidan_arr[$j]['dduserid']?><?=$url_end?>"><?=$shaidan_arr[$j]['ddusername']?></a></div>
    <div class="t" style="margin-top:3px"><font style="font-size:12px;color:#57504f"><?=date('m月d日 H:i',$shaidan_arr[$j]['time'])?> 分享</font></div>	   
   </div>
   <div class="line" style="height:40px;overflow:hidden;margin-top:8px"><?=utf_substr(strip_tags($shaidan_arr[$j]['comment']),28)?></div>
 </div>
 <?php }?>
  <div class="megas512" style="text-align:right;float:right"><?php pageft($total,$pagesize,1,0,0,10,$page_mall_list); echo $pagenav;?></div>
</div>
<div class="lineclear"></div>

<?php 
	include ("footer.tpl.php");
?>
<script type="text/javascript">
/*$(document).ready(function(){
h=new Array();
l=new Array();
h[0]=0;
for(i=1;i<=4;i++){
	h[i]=$('#zhanxian_'+i).height();
	l[i]=h[i];
	if(h[i]<h[i-1]){
		temp=h[i-1];
		h[i-1]=h[i];
		h[i]=temp;
	}
}
for(k=1;k<=4;k++){
	if(l[k]<h[4]){
		$('#zhanxian_'+k).append('<div class="zhanxian_list" style=" background:url(template/<?=MOBAN?>/images/0227.png);height:'+(h[4]-l[k]-10)+'px">&nbsp;</div>');
	}
}
});*/
	msg=new Array();
	msg[6]='您已经送过红心';
	msg[7]='登陆才能送红心哦';
	
	function likek(id){
		var user_hart=parseInt($("#x_"+id).text());
		$.post("a.php",{fun:'inc_hart',shai_id:id,xs:'share'},function(data){//alert(data);
			var data= eval("(" + data + ")");
			if(data.err==0){
				$("#x_"+id).text(user_hart+1);
			}
			else{
				alert(msg[data.msg]);
			}
		});
	};
</script>
</body>
</html>
